package com.jms.controller.cms;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import com.jms.utils.BinaryFile;

@Controller
@RequestMapping("/code")
public class CodeController {

	
	@RequestMapping("/manager")
	public String manager(HttpServletRequest request,String alias) throws Exception {
		String path = request.getServletContext().getRealPath("/")+"WEB-INF/views/news/"+alias+".jsp";
		String data = BinaryFile.read(path);
		request.setAttribute("data", data);
		return "/admin/code";
	}

}